import 'package:get/get.dart';
import 'package:sweetim/model/chat_record.dart';
import 'package:sweetim/service/chat_service.dart';

class ChatRecordController extends GetxController {

  var loading = true.obs;

  var list = <ChatRecord>[].obs;

  final ChatService _chatService = Get.put(ChatService());

  @override
  void onInit() {
    _initData();
    super.onInit();
  }

  void _initData() async {
    list.value = await _chatService.queryChatRecord();
    Get.log("list size : ${list.length}");
    loading.value = false;
  }

}
